package com.iwhalecloud.bss.kite.cucc.service.attr.linkhandler;

import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.cucc.service.attr.AttrModifyHelper;
import com.iwhalecloud.bss.kite.cucc.service.attr.LocalAttrHelper;
import com.iwhalecloud.bss.kite.cucc.service.attr.handler.CircuitTypeHandler;
import com.iwhalecloud.bss.kite.cucc.service.attr.handler.VcBindNumAndTypeHandler;
import com.iwhalecloud.bss.kite.listener.handler.attr.annotation.AttrHandler;
import com.iwhalecloud.bss.kite.listener.handler.attr.impl.AbstractAttrLinkageHandler;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import org.springframework.stereotype.Service;

/**
 * @author 付喆
 * @version 2021/5/24 14:53
 * Description:
 */
@Service
@AttrHandler(CircuitTypeHandler.class)
@AttrHandler(VcBindNumAndTypeHandler.class)
public class VcBindNumAndTypeLinkHandler extends AbstractAttrLinkageHandler<AttrData> {
    @Override
    public void handle(KiteAttr kiteAttr, KiteInst kiteInst, AttrData attrData) {
//        //承载电路类型 数字电路
//        if(KiteStringUtils.isEqual(kiteInst.getAttrValue("210004190"), "1_0000229")){
//            LocalAttrHelper.hideAndNullable(kiteInst, "210004193", "210004194", "210004195");
//        }
//        //以太网专线
//        else if(KiteStringUtils.isEqual(kiteInst.getAttrValue("210004190"), "110007436")){
//            AttrModifyHelper.displayAndNullable(kiteInst, "210004193");
//            //VC绑定数量及方式属性== 其他, 显示 VC捆绑方式属性、VC捆绑数量属性
//            if (!KiteStringUtils.isEqual(kiteAttr.getValue(), "1_0000151")) {
//                LocalAttrHelper.hideAndNullable(kiteInst, "210004194", "210004195");
//            }else {
//                AttrModifyHelper.displayAndNullable(kiteInst,"210004194", "210004195");
//            }
//        }
    }

    @Override
    public void handleStyle(KiteAttr kiteAttr, KiteInst kiteInst, AttrData attrData) {

    }
}
